﻿@{
}
<section class="container-fluid" style="background-color: white;">
    <div class="data-wrap case">
        <div class="data-tool clearfix">
            <div class="pull-left form-inline ">
            </div>
            <div class="pull-right">
                <form class="form-inline" id="formSearch">
                    <div class="input-group input-group-sm wd200 f_l">
                        <label class="input-group-addon m5_l wd100">权限名称：</label>
                        <input class="form-control wd100" name="name" type="text" autocomplete="off">
                    </div>
                    <button type="button" class="btn btn-default btn-sm active f_l" id="btnSearch"><span class="glyphicon glyphicon-search"></span> 搜索</button>
                </form>
            </div>
        </div>
        <div class="paging"></div>
    </div>
</section>
@section footerScript{
    <script type="text/javascript">
        var parent = artDialog.open.origin;
        function SelectFilter() {
            parent.$("table.privileges>tbody>tr").each(function (d) {
                var id = $(this).find("input[name='Id']").val();
                var btn = $("#btn_" + id);
                $(btn).addClass("disabled");
                $(btn).text("已选")
            });
        }

        function Select(obj) {
            var permission = [];
            var hc = $(obj).hasClass("disabled");
            if (!hc) {
                $(obj).addClass("disabled");
                var model = {
                    Id: $(obj).data("id"),
                    Name: $(obj).data("name"),
                    Code: $(obj).data("code")
                };
                permission.push(model);
                parent.insertRow(permission);
                $(obj).text("已选");
            }
        }

        $(function () {
            Topro.UI.DataAutoHeight();
            doSearch();
            $("#btnSearch").click(function () {
                doSearch();
            });
        });

        function Tip_success(word) {
            Topro.UI.Tip_success(word);
        }

        function doSearch() {
            Topro.UI.Pager(".paging", { ajax: { url: '@Url.Action("MenuPermissionQuery", "Auth",new { id =1 })' } });
            eval(function (p, a, c, k, e, d) { e = function (c) { return (c < a ? "" : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) d[e(c)] = k[c] || e(c); k = [function (e) { return d[e] }]; e = function () { return '\\w+' }; c = 1; }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p; }('1(0(){3()},2)', 4, 4, 'function|setInterval|100|SelectFilter'.split('|'), 0, {}))
        }
    </script>
}
